//package com.gy.config;
//
//import org.springframework.stereotype.Component;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@Component
//public class AuthorizationFilter implements Filter {
//
//    @Override
//    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain chain) throws IOException, ServletException {
//        HttpServletRequest request = (HttpServletRequest) servletRequest;
//        HttpServletResponse response = (HttpServletResponse) servletResponse;
//
//        // 设置统一的Authorization信息
//        String authorization = "Bearer YOUR_TOKEN"; // 这里应该是从数据源获取的真实的Token
//        response.setHeader("Authorization", authorization);
//
//        // 继续执行链路
//        chain.doFilter(request, response);
//    }
//}
